home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
090
/
spechsth.arc
/
SAY.ASM
< prev
next >
Wrap
Assembly Source File
|
1985-09-17
|
2KB
|
56 lines
TITLE Supplement to SPEECH.COM by Douglas Sisco 09-04-1985
PAGE 55,132
CODE SEGMENT 'CODE'
ASSUME CS:CODE,DS:CODE
ORG 100H
BEGIN: JMP START
; Put my name in .COM file - can be viewed with TYPE command.
DB 8,8,8,'Program by Douglas Sisco 9-4-85',13,10,26
; Here is a fake string descriptor - BASIC Manual C-8
; SPEECH expects a pointer to this on the stack when it is called
STRLEN DB ?
STROFS DW 82H
SPEECH DW 0972 ;DWORD Pointer to Speech
DW 0000 ;This is where it is put 0000:03CCH
NOSPEECH DB 'Speech Program not loaded - run SPEECH.COM and try again',13,10,'$'
START: XOR AX,AX
MOV DS,AX
MOV AL,DS:[3CCH] ;See if SPEECH.COM is in memory
CMP AL,0CDH
JZ OK
MOV AH,9
PUSH CS
POP DS
MOV DX,OFFSET NOSPEECH ;Print message if not
INT 21H
INT 20H ;Return to DOS
OK:
PUSH CS
POP DS
CMP BYTE PTR DS:[80H],0 ;Is there something to say ?
JZ OUT
DEC BYTE PTR DS:[80H] ;Don't count leading space
MOV AL,DS:[80H] ;Byte that contains len of cmd line
MOV STRLEN,AL
MOV AX,OFFSET STRLEN
PUSH AX ;Pass data location to speech program
CALL DWORD PTR SPEECH ;Say it
OUT:
INT 20H ;Exit to DOS
CODE ENDS
END BEGIN